package jp.sourceforge.akjrcp.videotools;

import jp.sourceforge.akjrcp.akj_betas.Akj_betasPlugin;
import jp.sourceforge.akjrcp.akj_betas.Messages;

import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class VideoToolsSettingPage extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage {
	public static final String PATH_MPLAYER="videotools.path_mplayer";
	public static final String PATH_MPLEX="videotools.path_mplex";
	public static final String PATH_SPUMUX="videotools.path_spumux";
	public static final String PATH_ATOMIC_PARSLEY="videotools.path_atomic_parsley";
	public static final String PATH_ASFBIN = "videotools.path_asfbin";
	public VideoToolsSettingPage() {
		super(GRID);
		setPreferenceStore(Akj_betasPlugin.getDefault().getPreferenceStore());
		setDescription(Messages.getString("videotools.description")); //$NON-NLS-1$
		initializeDefaults();
	}
	
	private void initializeDefaults() {
		
		// no one call it before open them

	}

	protected void createFieldEditors() {
		
		
		
		  FileFieldEditor filefield;
		  
		  filefield=new FileFieldEditor(
				  PATH_MPLAYER, Messages.getString("videotools.mplayer_path"),getFieldEditorParent()); //$NON-NLS-1$
		  filefield.setFileExtensions(new String[]{"mplayer.exe"}); //$NON-NLS-1$
	      addField(filefield);
	      
	      filefield=new FileFieldEditor(
				  PATH_MPLEX, Messages.getString("videotools.mplex_path"),getFieldEditorParent()); //$NON-NLS-1$
		  filefield.setFileExtensions(new String[]{"mplex.exe"}); //$NON-NLS-1$
	      addField(filefield);
	      
	      filefield=new FileFieldEditor(
	    		  PATH_SPUMUX, Messages.getString("videotools.spumux_path"),getFieldEditorParent()); //$NON-NLS-1$
		  filefield.setFileExtensions(new String[]{"spumux.exe"}); //$NON-NLS-1$
	      addField(filefield);
	      
	      filefield=new FileFieldEditor(
	    		  PATH_ATOMIC_PARSLEY, Messages.getString("videotools.path_atomic_parsley"),getFieldEditorParent()); //$NON-NLS-1$
		  filefield.setFileExtensions(new String[]{"AtomicParsley.exe"}); //$NON-NLS-1$
	      addField(filefield);
	      
	      filefield=new FileFieldEditor(
	    		  PATH_ASFBIN, Messages.getString("videotools.path_asfbin"),getFieldEditorParent()); //$NON-NLS-1$
		  filefield.setFileExtensions(new String[]{"asfbin.exe"}); //$NON-NLS-1$
	      addField(filefield);
	}

	public void init(IWorkbench workbench) {
		// TODO Auto-generated method stub
		
	}

}
